<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateNotificationsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('notification', function (Blueprint $table) {
            $table->increments('not_id')->comment('主键');
            $table->string('type', 10)->comment('user pend like share comment at other');
            $table->string('content')->comment('提示内容');
            $table->string('i')->default('fa-ellipsis-h')->comment('icon');
            $table->string('s')->default('info')->comment('样式');
            $table->string('t')->nullable()->comment('中文类型');
            $table->integer('id')->comment('来自用户ID')->nullable();
            $table->string('from', 10)->comment('user system');
            $table->string('to', 10)->comment('user admin');
            $table->boolean('status')->default(0)->comment('状态0->未读 1->已读');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('notification');
    }
}
